package com.nebula.common;

public class Const {
	public static final String USERNAME = "username";
	public static final String PASSWORD = "password";
	public static final String EMAIL = "email";
	public static final String USERINFO = "userInfo";
	public static final String CUSTOMER = "普通用户";
	public static final String REGULAR_MEMBERS = "普通会员";
	public static final String SUPER_MEMBERS = "超级会员";
	public static final String FAILURE = "已失效";
	public static final String PERMANENT = "永久有效";
	public static final String FILE_DELETED = "分享的文件已被删除";
	public static final String OVERDUE = "分享已过期";
	
	public static final String APK_ICON = "static/image/filetype/apk.png";
	public static final String BT_ICON = "static/image/filetype/bt.png";
	public static final String DOC_ICON = "static/image/filetype/doc.png";
	public static final String EXE_ICON = "static/image/filetype/exe.png";
	public static final String FOLDER_ICON = "static/image/filetype/folder.png";
	public static final String HTML_ICON = "static/image/filetype/html.png";
	public static final String IMG_ICON = "static/image/filetype/img.png";
	public static final String IPA_ICON = "static/image/filetype/ipa.png";
	public static final String MUSIC_ICON = "static/image/filetype/music.png";
	public static final String PDF_ICON = "static/image/filetype/pdf.png";
	public static final String PPT_ICON = "static/image/filetype/ppt.png";
	public static final String TXT_ICON = "static/image/filetype/txt.png";
	public static final String UNKNOWN_ICON = "static/image/filetype/unknown.png";
	public static final String VCF_ICON = "static/image/filetype/vcf.png";
	public static final String VEDIO_ICON = "static/image/filetype/vedio.png";
	public static final String VSD_ICON = "static/image/filetype/vsd.png";
	public static final String XLS_ICON = "static/image/filetype/xls.png";
	public static final String ZIP_ICON = "static/image/filetype/zip.png";
	public static final String MULTI_ICON = "static/image/filetype/multi.png";
	
	public static final String VIRTUAL_DIRECTORY = "/rs/";
	public static final String DOMAIN_NAME = "http://localhost:8080";
	
	public interface DefaultPage{
		String pageNum = "1";
		String pageSize = "15";
	}
	
	public interface Role{
		int NEED_LOGIN = 10; //需要登录
	}
	
	public enum OrderStatusEnum{
        CANCELED(0,"已取消"),
        NO_PAY(10,"未支付"),
        PAID(20,"已付款"),
        ORDER_SUCCESS(40,"订单完成"),
        ORDER_CLOSE(50,"订单关闭");

        OrderStatusEnum(int code,String value){
            this.code = code;
            this.value = value;
        }
        private String value;
        private int code;

        public String getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }

        public static OrderStatusEnum codeOf(int code){
            for(OrderStatusEnum orderStatusEnum : values()){
                if(orderStatusEnum.getCode() == code){
                    return orderStatusEnum;
                }
            }
            throw new RuntimeException("没有找到对应的枚举");
        }
    }
    public interface  AlipayCallback{
        String TRADE_STATUS_WAIT_BUYER_PAY = "WAIT_BUYER_PAY";
        String TRADE_STATUS_TRADE_SUCCESS = "TRADE_SUCCESS";

        String RESPONSE_SUCCESS = "success";
        String RESPONSE_FAILED = "failed";
    }



    public enum PayPlatformEnum{
        ALIPAY(1,"支付宝");

        PayPlatformEnum(int code,String value){
            this.code = code;
            this.value = value;
        }
        private String value;
        private int code;

        public String getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }
    }

    public enum PaymentTypeEnum{
        ONLINE_PAY(1,"在线支付");

        PaymentTypeEnum(int code,String value){
            this.code = code;
            this.value = value;
        }
        private String value;
        private int code;

        public String getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }

        public static PaymentTypeEnum codeOf(int code){
            for(PaymentTypeEnum paymentTypeEnum : values()){
                if(paymentTypeEnum.getCode() == code){
                    return paymentTypeEnum;
                }
            }
            throw new RuntimeException("没有找到对应的枚举");
        }

    }
}
